Get Users List
Get Users List Example
For the list of users you need to use the getUsers
and provide the pagination attributes page
and perPage
Check the example:
import AltibbiTelehealth
ApiService.getUsers(page: 1, perPage: 20, completion: {users, failure, error in
// Handle users as an array of User object
})
The
getUsers
will return an array of user data object that could be decoded toUser
array of objects
Responses
Status 200
Success
[
{
id: '999999999',
name: "Altibbi User",
email: "[email protected]",
dateOfBirth: "2000-01-30",
gender: "male",
insuranceId: "123123123",
policyNumber: '111111111',
nationalityNumber: '11110000',
height: 180,
weight: 90,
bloodType: 'A+',
smoker: 'yes',
alcoholic: 'no',
maritalStatus: 'single'
}
]
Status 401
UnauthorizedHttpException represents an Unauthorized HTTP exception with status code 401.
{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials",
"code": "0",
"status": "401",
"type": "yii\\\\web\\\\UnauthorizedHttpException"
}